<script>
    function showPluginOwnerStuff(pluginname){
            if (window.XMLHttpRequest)
              {
              xhttp=new XMLHttpRequest();
              }
            else // IE 5/6
              {
              xhttp=new ActiveXObject("Microsoft.XMLHTTP");
              }
            xhttp.onreadystatechange = function(){
                if(this.readyState == 4) {
                    if(this.responseXML.childNodes[1].childNodes[0].textContent == 1)
                    {
                        var code = $("#actions_" + pluginname).html();
                        code += "<br /><a href='index.php?include=admin/submit_plugin'>Einreichen</a>";
                        $("#actions_" + pluginname).html(code);
                    }
                }
            };
            xhttp.open("GET","{VAR:HOST}system/plugins/contentlionapi/xml.php?method=allowowning&plugin_name=" + escape(pluginname) + "&apikey={VAR:APIKEY}");
            xhttp.send();
    }
</script>
<table class="datatable">
  <thead>
    <tr>
      <td style="width:150px">{LANG:NAME}</td>
      <td>{LANG:VERSION}</td>
      <td style="width:390px">{LANG:DESCRIPTION}</td>
      <td style="width:150px">{LANG:LICENSE}</td>
      <td style="width:220px">{LANG:AUTHOR}</td>
      <td>{LANG:ACTIONS}</td>
    </tr>
  </thead>
  <tbody>
    {LOOP:PLUGINS}
      <tr>
        <td>{VAR:NAME}</td>
        <td>{VAR:VERSION}</td>
        <td>{VAR:DESCRIPTION}</td>
		<td>
			<a href="{VAR:LICENSEURL}">
				{VAR:LICENSE}
			</a>
		</td>
        <td>
          <a href="{VAR:AUTHORLINK}">
            {VAR:AUTHORNAME}
          </a>
        </td>
        <td id="actions_{VAR:PATH}">{VAR:ACTIVATIONLINK}</td>
      </tr>
      <script>
          $(document).ready(function(){
              showPluginOwnerStuff('{VAR:PATH}');
          });
      </script>
    {/LOOP:PLUGINS}
  </tbody>
</table>